package com.yxlgateway.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yxlcommon.common.pojo.RespBean;
import com.yxlcommon.common.pojo.User;
import org.springframework.web.multipart.MultipartFile;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author yxl
 * @since 2021-11-09
 */
public interface UserService extends IService<User> {
    //⽤户注册
    RespBean<Integer> userRegister(User user);
    //⽤户登录
    RespBean<User> checkLogin(String name, String pwd);
    //忘记密码
    RespBean forgetPwd(User user);
    //查询用户信息
    RespBean<User> selectUser(User user);
    //更改密码
    RespBean<String> changePwd(User user);

    RespBean updateUserInfo(User user);

    RespBean<Integer> updateAvatar(MultipartFile avatar,User user) throws Exception;

    RespBean selectUserImg(User user);

    RespBean<IPage<User>> getAllUserByPage(User user, Integer pageCode, Integer size);

    RespBean deleteUserById(User user);

    RespBean<Integer> changeUserById(User user);

    RespBean<Integer> addUser(User user);
}
